<?php
use app\models\Activity;
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $model \app\models\Activity */
/* @var $applyList */
?>

<?php foreach ($models as $model): ?>
<div class="card-box">
    <div class="card-box-inner">

        <div class="card-tag <?= Activity::$cidTag[$model->cid]; ?>"><?= Activity::$cidLabels[$model->cid]; ?></div>

        <div class="card-img">
            <a data-href="<?= Url::to(['activity/detail', 'id' => $model->id]); ?>">
                <img src="<?= $model->getThumb(); ?>"/>
            </a>
        </div>
        <div class="card-content">
            <div class="card-content-title">
                <h4><?= Html::encode($model->title); ?></h4>
<!--                <span>--><?//= Html::encode($model->salary); ?><!--</span>-->
                <?php if(\Yii::$app->controller->action->id !== 'favorites'): ?>
                <span class="mui-pull-right mui-h5" style="white-space: nowrap;">
                    <?= $model->getApplyLabel($applyList[$model->id]['status']); ?>
                </span>
                <?php endif; ?>
            </div>
<!--            <div class="card-content-bd">-->
<!--                --><?//= Html::encode($model->company); ?>
<!--            </div>-->

            <?= $this->render($model->getIsActivity() ? '/activity/__activity' : '/activity/__job', compact('model')); ?>
        </div>
    </div>
</div>
<?php endforeach; ?>